package main

import (
	"fmt"
)

func sort(arrA []int) {
	for i := 0; i < len(arrA); i++ {
		for j := 0; j < len(arrA)-i-1; j++ {
			if arrA[j] > arrA[j+1] {
				arrA[j], arrA[j+1] = arrA[j+1], arrA[j]
			}
		}
	}
}
func main() {
	array := []int{3, 5, 23, 6, 34, 4, 1, 456, 23, 64}
	fmt.Println("原始数据:")
	fmt.Println(array)
	for _, v := range array {
		fmt.Printf("%d ", v)
	}
	fmt.Println("")
	sort(array)
	fmt.Println("排序后数据:")
	for _, v := range array {
		fmt.Printf("%d ", v)
	}
	fmt.Println("")
	
}
